﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.IO.File
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System.Runtime.CompilerServices;
using UnityEngine.Bindings;

#nullable disable
namespace UnityEngine.IO
{
  [NativeHeader("Runtime/VirtualFileSystem/VirtualFileSystem.h")]
  [NativeConditional("ENABLE_PROFILER")]
  [StaticAccessor("FileAccessor", StaticAccessorType.DoubleColon)]
  internal static class File
  {
    internal static ulong totalOpenCalls => File.GetTotalOpenCalls();

    internal static ulong totalCloseCalls => File.GetTotalCloseCalls();

    internal static ulong totalReadCalls => File.GetTotalReadCalls();

    internal static ulong totalWriteCalls => File.GetTotalWriteCalls();

    internal static ulong totalSeekCalls => File.GetTotalSeekCalls();

    internal static ulong totalZeroSeekCalls => File.GetTotalZeroSeekCalls();

    internal static ulong totalFilesOpened => File.GetTotalFilesOpened();

    internal static ulong totalFilesClosed => File.GetTotalFilesClosed();

    internal static ulong totalBytesRead => File.GetTotalBytesRead();

    internal static ulong totalBytesWritten => File.GetTotalBytesWritten();

    internal static bool recordZeroSeeks
    {
      set => File.SetRecordZeroSeeks(value);
      get => File.GetRecordZeroSeeks();
    }

    internal static ThreadIORestrictionMode MainThreadIORestrictionMode
    {
      get => File.GetMainThreadFileIORestriction();
      set => File.SetMainThreadFileIORestriction(value);
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    internal static extern void SetRecordZeroSeeks(bool enable);

    [MethodImpl(MethodImplOptions.InternalCall)]
    internal static extern bool GetRecordZeroSeeks();

    [MethodImpl(MethodImplOptions.InternalCall)]
    internal static extern ulong GetTotalOpenCalls();

    [MethodImpl(MethodImplOptions.InternalCall)]
    internal static extern ulong GetTotalCloseCalls();

    [MethodImpl(MethodImplOptions.InternalCall)]
    internal static extern ulong GetTotalReadCalls();

    [MethodImpl(MethodImplOptions.InternalCall)]
    internal static extern ulong GetTotalWriteCalls();

    [MethodImpl(MethodImplOptions.InternalCall)]
    internal static extern ulong GetTotalSeekCalls();

    [MethodImpl(MethodImplOptions.InternalCall)]
    internal static extern ulong GetTotalZeroSeekCalls();

    [MethodImpl(MethodImplOptions.InternalCall)]
    internal static extern ulong GetTotalFilesOpened();

    [MethodImpl(MethodImplOptions.InternalCall)]
    internal static extern ulong GetTotalFilesClosed();

    [MethodImpl(MethodImplOptions.InternalCall)]
    internal static extern ulong GetTotalBytesRead();

    [MethodImpl(MethodImplOptions.InternalCall)]
    internal static extern ulong GetTotalBytesWritten();

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern void SetMainThreadFileIORestriction(ThreadIORestrictionMode mode);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern ThreadIORestrictionMode GetMainThreadFileIORestriction();
  }
}
